set(SRC simple_logger.cpp)
set(HDR simple_logger.hpp)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_library(SimpleLoggerLib OBJECT ${SRC})
set_property(TARGET SimpleLoggerLib PROPERTY POSITION_INDEPENDENT_CODE 1)

set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})

add_library(${LIBRARY_NAME} SHARED $<TARGET_OBJECTS:SimpleLoggerLib>)
set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER ${HDR})
install(TARGETS ${LIBRARY_NAME}
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION lib
    PUBLIC_HEADER DESTINATION include
)

set(STATIC_LIBRARY_NAME ${LIBRARY_NAME}_static)
add_library(${STATIC_LIBRARY_NAME} STATIC $<TARGET_OBJECTS:SimpleLoggerLib>)
set_target_properties(${STATIC_LIBRARY_NAME} PROPERTIES PUBLIC_HEADER ${HDR})
install(TARGETS ${STATIC_LIBRARY_NAME}
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION lib
    PUBLIC_HEADER DESTINATION include
)
